package fr.enseirb.webxml.servlet;

import java.util.Properties;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import fr.enseirb.webxml.util.ServletToolkit;
import fr.enseirb.webxml.data.xml.XMLMediator;

public class ListTasksServlet extends HttpServlet {
	static String teatea = null;
	private static final long serialVersionUID = 1L;

	/**
	 * @see HttpServlet#HttpServlet()
	 */
	public ListTasksServlet() {
		super();
	}

	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
	    String sResponse = "";
	    if(request.getRequestURI().contains("task/list/xml")){
		sResponse = XMLMediator.getTasks();
	    }
	    if(request.getRequestURL().contains("task/list/xml/id")){
	    
		//???
	    }
	    response.setHeader("Content-Type", "application/xml");
	    ServletToolkit.writeResponse(response, sResponse);
	}

}

